package com.rm.zeyou.util.gaode.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 高德地理编码VO
 * @Title: GeoCodeVO
 * @Package com.sxskz.software.base.gaud.geocode.vo
 * @Author ZhangKeChen  🤙🤙🏼🤙🏽
 * @Date 2023/5/17 10:51 AM
 */
@NoArgsConstructor
@Data
public class GeoCodeVO implements Serializable {

    @JsonProperty("status")
    private String status;
    @JsonProperty("info")
    private String info;
    @JsonProperty("infocode")
    private String infocode;
    @JsonProperty("count")
    private String count;
    @JsonProperty("geocodes")
    private List<GeocodesDTO> geocodes;

    @NoArgsConstructor
    @Data
    public static class GeocodesDTO implements Serializable {
        @JsonProperty("formatted_address")
        private String formattedAddress;
        @JsonProperty("country")
        private String country;
        @JsonProperty("province")
        private String province;
        @JsonProperty("citycode")
        private String citycode;
        @JsonProperty("city")
        private String city;
        @JsonProperty("district")
        private Object district;
        @JsonProperty("township")
        private List<?> township;
        @JsonProperty("neighborhood")
        private NeighborhoodDTO neighborhood;
        @JsonProperty("building")
        private BuildingDTO building;
        @JsonProperty("adcode")
        private String adcode;
        @JsonProperty("street")
        private Object street;
        @JsonProperty("number")
        private Object number;
        @JsonProperty("location")
        private String location;
        @JsonProperty("level")
        private String level;

        @NoArgsConstructor
        @Data
        public static class NeighborhoodDTO implements Serializable {
            @JsonProperty("name")
            private List<?> name;
            @JsonProperty("type")
            private List<?> type;
        }

        @NoArgsConstructor
        @Data
        public static class BuildingDTO implements Serializable {
            @JsonProperty("name")
            private List<?> name;
            @JsonProperty("type")
            private List<?> type;
        }
    }
}
